﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="student.aspx.cs" Inherits="_Student" %>

<!--#include file="Top.aspx"-->
<div class="body">
    <form id="formStudent" name="form1" method="post" runat="server">
    <!--通知欢迎栏开始-->
    <div class="notice">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:label id="studentName" runat="server"></asp:label>
        ,您好,欢迎进入在线选课系统
    </div>
    <div class="clr">
    </div>
    <!--通知欢迎栏结束-->
    <div class="body_main">
        <!--个人菜单开始-->
        <div class="menu" runat="server">
            <ul>
                <li>
                    <asp:imagebutton id="Button2" runat="server" text="查看课程" imageurl="images/查看课程.jpg"
                        onclick="Button_allCourse_Click" />
                </li>
                <li>
                    <asp:imagebutton id="Button1" runat="server" text="个人信息" imageurl="images/个人信息.jpg"
                        onclick="Button_studentData_Click" />
                </li>
                <li>
                    <asp:imagebutton id="Button3" runat="server" text="已选课程" imageurl="images/我的课程.jpg"
                        onclick="Button_myCourse_Click" />
                </li>
                <li>
                    <asp:imagebutton id="Button4" runat="server" text="修改密码" imageurl="images/修改密码.jpg"
                        onclick="Button_changePassword_Click" />
                </li>
                <li>
                    <asp:imagebutton id="Button5" runat="server" text="退出系统" imageurl="images/返回.jpg"
                        onclick="Exit_Click" />
                </li>
            </ul>
            <p>
                &nbsp;</p>
        </div>
        <!--个人菜单结束-->
        <!--右侧数据框开始-->
        <div class="right_big">
            <!--学生个人信息开始-->
            <div id="StudentData" runat="server" visible="false">
                <h2>
                    个人信息</h2>
                <div class="fl">
                    <p>
                        <asp:label runat="server" text="学号：" width="55px" forecolor="Black"></asp:label>
                        <asp:label id="Num" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="姓名：" width="55px" forecolor="Black"></asp:label>
                        <asp:label id="Name" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="性别：" width="55px" forecolor="Black"></asp:label>
                        <asp:label id="Sex" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="身份证：" width="55px" forecolor="Black"></asp:label>
                        <asp:label id="IDcardNo" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="层次：" width="55px" forecolor="Black"></asp:label>
                        <asp:label id="Levels" runat="server"></asp:label>
                    </p>
                </div>
                <div class="fl">
                    <p>
                        <asp:label runat="server" text="可选课数：" width="66px" forecolor="Black"></asp:label>
                        <asp:label id="courseNumMax" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="学院：" width="66px" forecolor="Black"></asp:label>
                        <asp:label id="College" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="专业：" width="66px" forecolor="Black"></asp:label>
                        <asp:label id="Major" runat="server"></asp:label>
                    </p>
                    <p>
                        <asp:label runat="server" text="班级：" width="66px" forecolor="Black"></asp:label>
                        <asp:label id="Class" runat="server"></asp:label>
                    </p>
                </div>
            </div>
            <!--学生个人信息结束-->
            <!--修改个人密码开始-->
            <div id="ChangePassword" runat="server" visible="false">
                <h2>
                    修改密码</h2>
                <div class="fl">
                    <p>
                        原密码：</p>
                    <asp:textbox id="oldPassword" runat="server" textmode="Password" cssclass="input"></asp:textbox>
                    <p>
                        新密码：</p>
                    <asp:textbox id="newPassword1" runat="server" textmode="Password" cssclass="input"></asp:textbox>
                    <p>
                        确认新密码：</p>
                    <asp:textbox id="newPassword2" runat="server" textmode="Password" cssclass="input"></asp:textbox>
                    <p>
                        &nbsp;</p>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:imagebutton
                        id="Button_CPOK" runat="server" text="确定提交" imageurl="images/提交.jpg" onclick="Button_CPOK_Click" />
                </div>
            </div>
            <!--修改个人密码结束-->
            <!--课程列表开始-->
            <div id="DIVCourseDataList" runat="server" style="width: 660px;" visible="false">
                <h2>
                    可选课程</h2>
                <p>
                    &nbsp;</p>
                    <!--教学单位下拉框开始-->
                <p>
                    按教学单位筛选课程：
                    <asp:dropdownlist id="DropDownList_dept" runat="server" datasourceid="courseList"
                        datatextfield="deptName" datavaluefield="deptName" onselectedindexchanged="DropDownList_dept_SelectedIndexChanged"
                        autopostback="True">            
                    </asp:dropdownlist>
                </p>
                <asp:sqldatasource id="courseList" runat="server" connectionstring="<%$ ConnectionStrings:在线选课系统ConnectionString %>"
                    selectcommand="SELECT [deptName] FROM [dept]"></asp:sqldatasource>
                <!--教学单位下拉框结束-->
                <p>
                    &nbsp;</p>
                <asp:datagrid id="CourseDataList" runat="server" autogeneratecolumns="False" onitemcommand="showCourseInfo">
                    <Columns>              
                        <asp:BoundColumn DataField="courseID" HeaderText="课程编号" ItemStyle-Width="130px">
                        </asp:BoundColumn>
                        <asp:ButtonColumn CommandName="showCourse" DataTextField="courseName" HeaderText="课程名称" ButtonType="LinkButton"  ItemStyle-Width="255px">
                        </asp:ButtonColumn>
                        <asp:BoundColumn DataField="deptName" HeaderText="教学单位" ItemStyle-Width="220px">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="teacherName" HeaderText="教师"  ItemStyle-Width="100px">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="period" HeaderText="学时"  ItemStyle-Width="60px">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="credit" HeaderText="学分"  ItemStyle-Width="60px">
                        </asp:BoundColumn>
                        <asp:BoundColumn DataField="stuNumMax" HeaderText="人数限制"  ItemStyle-Width="130px">
                        </asp:BoundColumn>
                        <asp:ButtonColumn CommandName="addCourse" HeaderText="选择课程" text="选择此门课程" ButtonType="LinkButton"  ItemStyle-Width="130px">
                        </asp:ButtonColumn>
                    </Columns> 
                </asp:datagrid>
            </div>
            <!--课程列表结束-->
            <!--我的课程列表开始-->
            <div id="DIVMYCOURSELIST" runat="server" style="width: 500px;" visible="false">
                <h2>
                    我的课程</h2>
                <p>
                    &nbsp;</p>
                <asp:datagrid id="MYCOURSELIST" runat="server" autogeneratecolumns="False" onitemcommand="ItemsGrid_Delete">
                    <Columns>
                        <asp:BoundColumn DataField="courseName" HeaderText="课程名称" ItemStyle-Width="180px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="period" HeaderText="学时" ItemStyle-Width="39px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="credit" HeaderText="学分" ItemStyle-Width="39px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="term" HeaderText="学期" ItemStyle-Width="39px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="time" HeaderText="上课时间" ItemStyle-Width="66px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="site" HeaderText="上课地点" ItemStyle-Width="66px"></asp:BoundColumn>
                        <asp:BoundColumn DataField="score" HeaderText="成绩" ItemStyle-Width="39px"></asp:BoundColumn>
                        <asp:ButtonColumn CommandName="deleteCourse" text="取消" HeaderText="取消选课" ButtonType="LinkButton"  ItemStyle-Width="255px">
                        </asp:ButtonColumn>
                    </Columns> 
                </asp:datagrid>
            </div>
            <div class="clr">
            </div>
            <!--我的课程列表结束-->
            <!--课程信息开始-->
            <div id="DivCourseInfo" runat="server" visible="false">
                <h3>
                    课程信息</h3>
                <div class="fl">
                    <p>
                        课程编号 ：
                        <asp:label id="LabelCourseID" runat="server"></asp:label>
                    </p>
                    <p>
                        课程名称 ：
                        <asp:label id="LabelCourseName" runat="server"></asp:label>
                    </p>
                    <p>
                        任课老师 ：
                        <asp:label id="LabelTeacherName" runat="server"></asp:label>
                    </p>
                    <p>
                        课程学时 ：
                        <asp:label id="LabelPeriod" runat="server"></asp:label>
                    </p>
                    <p>
                        课程学分 ：
                        <asp:label id="LabelCredit" runat="server"></asp:label>
                    </p>
                    <p>
                        最大人数 ：
                        <asp:label id="LabelMaxNum" runat="server"></asp:label>
                    </p>
                </div>
                <div class="fl">
                    <p>
                        教学单位 ：
                        <asp:label id="LabelDept" runat="server"></asp:label>
                    </p>
                    <p>
                        上课时间 ：
                        <asp:label id="LabelTime" runat="server"></asp:label>
                    </p>
                    <p>
                        上课地点 ：
                        <asp:label id="LabelSite" runat="server"></asp:label>
                    </p>
                    <p>
                        开课学期 ：
                        <asp:label id="LabelTerm" runat="server"></asp:label>
                    </p>
                </div>
                <div class="clr">
                </div>
                <p>
                    课程简介 ：</p>
                <asp:label id="LabelIntroduce" runat="server"></asp:label>
                <p>
                    &nbsp;</p>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:imagebutton id="Button_ReturnCourseInfo" runat="server" text="返回课程信息" imageurl="images/返回.jpg"
                    onclick="Button_allCourse_Click" />
            </div>
            <!--课程信息结束-->
        </div>
        <div class="clr">
        </div>
        <!--右侧数据框结束-->
    </div>
    <div class="clr">
    </div>
    </form>
</div>
<!--#include file="Footer.aspx"-->
